package middleware

import (
	"fitness/internal/dao"
)

type MiddlewareContainer struct {
	Rbac *Rbac
}

// CreateRbacInstance 创建单例
func CreateRbacInstance(daoContainer *dao.DaoContainer) *MiddlewareContainer {
	rbac := NewRbac(daoContainer.SysRoleDao, daoContainer.SysRoleMenuDao)

	return &MiddlewareContainer{
		Rbac: rbac,
	}
}
